package com.parent;

import com.child.annotations.EnableChildProject;
import org.mybatis.spring.annotation.MapperScan;
import org.springframework.boot.SpringApplication;
import org.springframework.boot.autoconfigure.SpringBootApplication;
import org.springframework.context.ConfigurableApplicationContext;
import org.springframework.context.annotation.Import;

import java.util.stream.Stream;

/**
 * com.parent.ParentApplication
 *
 * @author: wanglei62
 * @DATE: 2022/10/17 14:39
 **/

//TODO 引入child
//@SpringBootApplication(scanBasePackages = {"com.child","com.parent"})
@SpringBootApplication(scanBasePackages = {"com.parent"})
//@Import(value = com.child.config.ChildConfiguration.class)
//@EnableChildProject
@MapperScan(basePackages = "com.parent.mapper")
public class ParentApplication {
    public static void main(String[] args){
        ConfigurableApplicationContext ctx =  SpringApplication.run(ParentApplication.class,args);
        String[] beanNames = ctx.getBeanDefinitionNames();
        Stream.of(beanNames).forEach(System.out::println);
    }
}
